<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
	<PropertyGroup>
		<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
	</PropertyGroup>

	<PropertyGroup>
		<_IsSdkStyleProject>false</_IsSdkStyleProject>
		<_IsSdkStyleProject Condition="'$(Configurations)' != '' and '$(Platforms)' != ''">true</_IsSdkStyleProject>
		<!-- target framework for the core and addins -->
		<MDFrameworkVersion>v4.7.2</MDFrameworkVersion>
		<MDTargetFramework>net472</MDTargetFramework>
		<!--
		for sdk-style projects we can set the value directly.
		old-style projects need to set it themselves or some IDE stuff breaks.
		-->
		<TargetFramework Condition="'$(_IsSdkStyleProject)'=='true'">$(MDTargetFramework)</TargetFramework>
	</PropertyGroup>

	<!-- set some common AssemblyInfo values so SDK-style projects don't have to set them -->
	<PropertyGroup>
		<AssemblyVersion>2.6.0</AssemblyVersion>
		<AssemblyProduct>MonoDevelop</AssemblyProduct>
	</PropertyGroup>

	<!--
	Sign assemblies so they get IVT access to Roslyn.
	-->
	<PropertyGroup>
		<SignAssembly>true</SignAssembly>
		<PublicSign>True</PublicSign>
		<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)\MonoDevelop-Public.snk</AssemblyOriginatorKeyFile>
	</PropertyGroup>

	<PropertyGroup>
		<DownloadNupkgDirectory>$(MSBuildThisFileDirectory)..\packages\</DownloadNupkgDirectory>
	</PropertyGroup>

	<!-- set a bunch of default value the project can override -->
	<PropertyGroup>
		<OutputType>Library</OutputType>
		<AssemblyName>$(MSBuildProjectName)</AssemblyName>
		<RootNamespace>$(MSBuildProjectName)</RootNamespace>
	</PropertyGroup>

	<ItemDefinitionGroup Condition="'$(ShortEmbeddedResourceIDs)'!='False'">
		<EmbeddedResource>
			<LogicalName>%(Filename)%(Extension)</LogicalName>
		</EmbeddedResource>
	</ItemDefinitionGroup>

	<ItemGroup Condition=" '$(MD_PERF_ANALYZERS_ENABLED)' == 'true' ">
		<!-- ErrorProne.NET.Structs -->
		<Analyzer Include="$(PackagesDirectory)\ErrorProne.NET.Structs.$(NuGetVersionErrorProneNetStructs)\analyzers\dotnet\cs\ErrorProne.Net.StructAnalyzers.dll" />

		<!-- ClrHeapAllocationAnalyzer -->
		<Analyzer Include="$(PackagesDirectory)\ClrHeapAllocationAnalyzer.$(NuGetVersionAllocationAnalyzer)\analyzers\dotnet\cs\ClrHeapAllocationAnalyzer.dll" />
	</ItemGroup>

	<PropertyGroup>
		<XamarinMacAnalyzerMinimumOSVersion>10.13</XamarinMacAnalyzerMinimumOSVersion>
		<MonoDevelopDevAnalyzer>$(PackagesDirectory)\MonoDevelopDev.Analyzers.$(NugetVersionMonoDevelopAnalyzers)\analyzers\dotnet\cs\MonoDevelop.Analyzers.dll</MonoDevelopDevAnalyzer>
	</PropertyGroup>

	<ItemGroup>
		<Analyzer Include="$(MonoDevelopDevAnalyzer)" Condition="Exists('$(MonoDevelopDevAnalyzer)')" />
	</ItemGroup>

	<!-- hide these items from VS -->
	<ItemDefinitionGroup>
		<IncludeCopyLocal>
			<Visible>False</Visible>
		</IncludeCopyLocal>
		<SuppressCopyLocal>
			<Visible>False</Visible>
		</SuppressCopyLocal>
		<DownloadNupkg>
			<Visible>False</Visible>
		</DownloadNupkg>
	</ItemDefinitionGroup>

	<!-- default items -->
	<ItemGroup Condition="'$(EnableDefaultItems)' == 'true'">
		<EmbeddedResource Include="**\*.addin.xml" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
	</ItemGroup>

</Project>
